package com.city.justlisten.service.impl;

import com.city.justlisten.mapper.AdminMapper;
import com.city.justlisten.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

/**
 * Created with IntelliJ IDEA.
 * User: Cheng
 * Date: 2021/1/28
 * Time: 22:26
 * Description: No Description
 */
@Service
public class AdminServiceImpl implements AdminService {

    @Autowired
    private AdminMapper adminMapper;

    /**
     * 验证密码
     *
     * @param name
     * @param password
     * @return
     */
    @Override
    public Boolean validationPassword(String name, String password) {
        if (!(StringUtils.isEmpty(name))&&!(StringUtils.isEmpty(password))){
            int i = adminMapper.validationPassword(name, password);
            return i>0;
        }
        return false;
    }
}
